a=input("введите строчку")
a="{ ( ) } [ ]"
a=a.replace(" ","")
while'{}' in a or '()' in a or '[]' in a:
    a = a.replace('{}',"")
    a = a.replace('()',"")
    a = a.replace('[]',"")
if len(a) == 0:print('True')
else: print('false')
